<template>
  <div class="box">
    <el-row class="row-item">
      <el-col :span="8">姓名：</el-col>
      <el-col :span="16"><span v-text="user.userName"></span></el-col>
    </el-row>
    <el-row class="row-item">
      <el-col :span="8">手机：</el-col>
      <el-col :span="16"><span v-text="user.phoneNumber"></span></el-col>
    </el-row>
    <el-row class="row-item">
      <el-col :span="8">邮箱：</el-col>
      <el-col :span="16"><span v-text="user.emailAddress"></span></el-col>
    </el-row>
    <el-row class="row-item">
      <el-col :span="8">部门：</el-col>
      <el-col :span="16"><span v-text="user.deptName"></span></el-col>
    </el-row>
    <el-row class="row-item">
      <el-col :span="8">角色：</el-col>
      <el-col :span="16"><span v-text="user.roleName"></span></el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  data() {
    return {
      user: {
        userName: '',
        phoneNumber: '',
        emailAddress: '',
        deptName: '',
        roleName: ''
      }
    }
  },
  mounted() {
    this.initUser()
  },
  methods: {
    initUser() {
      let str = this.$store.state.user.token
      this.user = JSON.parse(str)
    }
  }
}
</script>
<style lang="scss" scoped>
.btn-box{
  text-align: right;
}
.row-item{
  height: 35px;
  line-height: 35px;
}
.red-font{
  color: red;
}
</style>
